From: YAMAMOTO Mitsuharu Date: Sat, 25 Apr 2009 00:26:16 +0000 (+0000) Subject: (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]: X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~752 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ab1db5b6a302f87b01358fb795a20c7c5081c97d;p=emacs.git (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]: Swap bytes in short integer if fringe bitmap width > 8. --- diff --git a/src/fringe.c b/src/fringe.c index 9b592414532..41fc24d1150 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1369,7 +1369,11 @@ init_fringe_bitmap (which, fb, once_p) | (swap_nibble[(b>>4) & 0xf] << 8) | (swap_nibble[(b>>8) & 0xf] << 4) | (swap_nibble[(b>>12) & 0xf])); - *bits++ = (b >> (16 - fb->width)); + b >>= (16 - fb->width); +#ifdef WORDS_BIG_ENDIAN + b = ((b >> 8) | (b << 8)); +#endif + *bits++ = b; } } #endif /* HAVE_X_WINDOWS */